<template>
  <view class="content">
    <uni-nav-bar
      title="订单详情"
      color="#fff"
      backgroundColor="transparent"
      :border="false"
      :statusBar="true"
      :fixed="true"
      @clickLeft="$c.back()"
    >
      <view class="uni-nav-bar-l-icon" slot="left">
        <view class="uni-nav-bar-l-icon-left icon">
          <image :src="$img('/static/img2/cc20.png')" lazy-load></image>
        </view>
      </view>
    </uni-nav-bar>

    <!-- 地址 -->
    <view class="address_z">
      <!-- <image :src="$img('/static/img/address.png')" lazy-load></image> -->

      <view class="address_z_r">
        <view>
          <text style="font-size: 28rpx; font-weight: 600">
            {{ list.name }}
          </text>
          <text style="color: #fff; margin-left: 10rpx">
            {{ list.mobile }}
          </text>
        </view>
        <view style="margin-top: 20rpx">{{ list.address }}</view>
      </view>
    </view>
    <!-- 赏品 -->
    <view class="xuyuan">
      <scroll-view class="card-goods" scroll-x>
        <view class="goods-item" v-for="(item, i) in goods" :key="i">
          <view class="pic">
            <image :src="item.goodslist_imgurl" lazy-load></image>

            <view class="type">{{ item.shang_title }}</view>

            <view class="num">×{{ item.prize_num }}</view>
          </view>

          <view class="title hang1">
            {{ item.goodslist_title }}
          </view>
        </view>
      </scroll-view>
    </view>
    <!-- 时间 -->
    <view class="dingdan">
      <view>提交时间：{{ list.addtime }}</view>
      <view style="border: none">订单号：{{ list.send_num }}</view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      z_imgPath: this.$z_img2,
      goods: [],
      list: {}
    }
  },
  onLoad(e) {
    this.getData(e.id)
  },
  methods: {
    back() {
      uni.navigateBack()
    },

    getData(e) {
      // 模拟接口
      let that = this
      that.req({
        url: 'warehouse_send_record_detail',
        Loading: true,
        data: {
          id: e
        },
        success(res) {
          if (res.status == 1) {
            that.goods = res.data.goods
            that.list = res.data
          }
        }
      })
    }
  }
}
</script>

<style lang="scss">
.list_img .shang_title {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.8);
  left: 0;
  /* width: 100%; */
  color: #333;
  font-size: 24rpx;
  /* font-family: 'zcq'; */
  text-align: left;
  padding: 4rpx 10rpx;
  box-sizing: border-box;
  /* border: 1px solid #000000; */
  width: 100%;
  display: flex;
  justify-content: space-between;

  .type {
    font-size: 22rpx;
    font-family: zihun147hao-xingyuanhei;
    font-weight: 400;
    color: #fff;
  }

  .num {
    font-size: 20rpx;
    font-family: Source Han Sans CN;
    font-weight: 400;
    color: #ffffff;
  }
}

.list_img > image {
  width: 100%;
  height: 100%;
  // margin: 1rpx auto;
}

.list_img {
  box-sizing: border-box;
  width: 100%;
  height: 170rpx;
  position: relative;
  border: 1px solid;
  border-image: linear-gradient(90deg, #2dcbff, #ff95fb) 1 1;
}

.dingdan > view {
  padding: 20rpx 0;
}

.dingdan {
  width: 690rpx;
  margin: 20rpx auto;
  padding: 0 30rpx;
  box-sizing: border-box;
  font-size: 28rpx;
  background: #252525;
  border: 2rpx solid #444444;

  font-size: 24rpx;
  color: #ffffff;
}

.address_z_r {
  // width: 584rpx;
  // margin-left: 30rpx;
}

.address_z > image {
  width: 50rpx;
  height: 50rpx;
}

.address_z {
  width: 690rpx;
  margin: 20rpx auto;
  padding: 30rpx;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  font-size: 24rpx;
  color: #ffffff;

  background: #252525;
  border: 2rpx solid #444444;
}

.xuyuan_item_2 {
  color: #ffffff;
  font-size: 24rpx;
  width: 100%;
  margin-top: 6rpx;
}

.xuyuan_item > image {
  width: 180rpx;
  height: 180rpx;
  border-radius: 10rpx 10rpx 0 0;
}

.xuyuan_item {
  width: 170rpx !important;
  // height: 240rpx;
  // box-sizing: border-box;
  // padding: 18rpx 20rpx 0;

  margin: 0 10rpx;
}

.xuyuan_con {
  display: flex;
  margin: 14rpx auto 0;
  width: 630rpx;
  box-sizing: border-box;
  overflow-x: scroll;
}

.xuyuan {
  width: 690rpx;
  font-size: 24rpx;
  color: #ffffff;
  margin: 24rpx auto 0;
  padding: 30rpx 2rpx 30rpx;
  box-sizing: border-box;

  background: #252525;
  border: 2rpx solid #444444;

  .card-goods {
    white-space: nowrap;

    .goods-item {
      display: inline-block;
      width: 170rpx;
      margin-right: 20rpx;

      &:first-child {
        margin-left: 20rpx;
      }

      .pic {
        width: 100%;
        height: 170rpx;
        box-sizing: border-box;
        border-radius: 10rpx 10rpx 10rpx 10rpx;
        border: 2rpx solid #000000;
        position: relative;

        image {
          width: 100%;
          height: 100%;
        }

        .type {
          position: absolute;
          z-index: 1;
          left: 0;
          top: 0;
          height: 32rpx;
          display: flex;
          align-items: center;
          padding: 0 14rpx;
          background: #e4690d;
          border-radius: 10rpx 0 0 0;

          font-family: 光良酒-干杯体, 光良酒-干杯体;
          font-weight: 400;
          font-size: 20rpx;
          color: #ffffff;
        }

        .num {
          position: absolute;
          z-index: 1;
          left: 0;
          bottom: 0;
          height: 32rpx;
          width: 100%;
          box-sizing: border-box;
          padding: 0 10rpx;
          display: flex;
          justify-content: center;
          align-items: center;
          background: rgba(0, 0, 0, 0.6);

          font-size: 24rpx;
          font-family: Source Han Sans CN;
          font-weight: 400;
          color: #ffffff;
        }
      }

      .title {
        padding: 10rpx 10rpx 0;

        font-size: 24rpx;
        font-family: Source Han Sans CN;
        font-weight: 400;
        color: #fff;
      }
    }
  }
}

.content {
  width: 100vw;
  min-height: 100vh;
  padding-top: 1rpx;
  box-sizing: border-box;
}
</style>
